package com.hxrfid.project.domain.bo;

import com.hxrfid.common.core.domain.BaseEntity;
import com.hxrfid.common.core.validate.AddGroup;
import com.hxrfid.common.core.validate.EditGroup;
import lombok.*;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.math.BigDecimal;
import java.util.Date;

/**
 * 余额变动记录业务对象 bs_money_record
 *
 * @author hxrfid
 * @date 2025-06-12
 */
@Builder
@AllArgsConstructor
@NoArgsConstructor
@Data
@EqualsAndHashCode(callSuper = true)
public class BsMoneyRecordBo extends BaseEntity {

    /**
     * 主键
     */
    @NotNull(message = "主键不能为空", groups = { EditGroup.class })
    private Long id;

    /**
     * 类型
     */
    @NotBlank(message = "类型不能为空", groups = { AddGroup.class, EditGroup.class })
    private String title;

    /**
     * 变动数量
     */
    @NotBlank(message = "变动数量不能为空", groups = { AddGroup.class, EditGroup.class })
    private String changeNum;

    /**
     * 类型（1余额2积分）
     */
    @NotBlank(message = "类型（1余额2积分）不能为空", groups = { AddGroup.class, EditGroup.class })
    private String changeType;

    /**
     * 用户id
     */
    @NotNull(message = "用户id不能为空", groups = { AddGroup.class, EditGroup.class })
    private Long userId;

    /**
     * 支付方式
     */
    @NotBlank(message = "支付方式不能为空", groups = { AddGroup.class, EditGroup.class })
    private String payType;

    /**
     * 订单编号
     */
    @NotBlank(message = "订单编号不能为空", groups = { AddGroup.class, EditGroup.class })
    private String orderNo;

    /**
     * 下单时间
     */
    @NotNull(message = "下单时间不能为空", groups = { AddGroup.class, EditGroup.class })
    private Date orderTime;

    /**
     * 订单金额
     */
    @NotNull(message = "订单金额不能为空", groups = { AddGroup.class, EditGroup.class })
    private BigDecimal realPrice;

    /**
     * 备注
     */
    @NotBlank(message = "备注不能为空", groups = { AddGroup.class, EditGroup.class })
    private String remark;


}
